# -*- encoding=utf8 -*-
__author__ = "Bryan.Chen"

from airtest.core.api import *

auto_setup(__file__)

from poco.drivers.std import StdPoco
poco = StdPoco()

using("../FlowTest.air")
import FlowTest

class Login_Questionnaire(FlowTest.BaseTestCase):
    
    def __init__(self):
        print("%s.__init__" % __file__)
        
    def runTest(self, args):
        try:
            poco("QuestionnaireView").wait_for_appearance(1.0)
        except:
            print(u"模块未加载")
            return True
        
        view = poco("QuestionnaireView")
        if not view.exists():
            return True
        
        btnBack = view.offspring("button_close")
        if not btnBack.exists():
            return
        btnBack.click([0.5, 0.5])

        return True
                       
_instance = Login_Questionnaire()
runTest = _instance.runTest 
